import subprocess


#运行前，一定要先申请su权限
def runCmd(cmd):
    ret = subprocess.run(
                cmd,
                shell=True,
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE,
                encoding="utf-8",
                timeout=1)
                
    return ret



# iptables -nvL INPUT
# iptables -nvl OUTPUT
# "iptables -A INPUT -j REJECT -s 172.26.240.1 -p icmp"
# "iptables -I OUTPUT -j REJECT -s 172.26.240.1 -p icmp"

# "iptables -I INPUT -j REJECT -p tcp -dport 8000 "
# "iptables -I INPUT -j ACCEPT -p tcp -s 172.26.240.1/20 --dport 8000"

